implemented horizontal gravity