Updated to work with points in the case statement