replaced local static variables with variables stored in engine snapshots