work on middleblink function