implemented gravity, decelleration when no movement key is pressed and jumping