added stuff for gravity