update: moved calculateGravity method call