Added bounceOffEdge