Refactor add_balls method