modified if statements so no error occurs if the balls radius is negative