updated gravity js