implemented "gravity" setting