added gravity variable