Gravity class implemented