some refactoring for eyeblink