added decay to balanceAboveFoot function