add js for gravity