fixed type mismatch
changed gravity definition
changed infinity definition