refactored to have pupilframe and eyeframe method