added switch function to convert quadrant return to direction of slide