added gravity support