eye tracking helper function