Removed hardcoded nBalls value to use defined constant