made memory attribute a var so it can be changed in the game code.