shallow implementation of gravity