optimalize gravity
merged