implemented gravity and did other things I don't remember