updated platformer code