refactor ball method