added gravity and pin behavior