Added the bounding square to prevent the balls from escaping
Added the bounding square to prevent the balls from escaping