working zoom function and we go int directly after animation is finished or esc is pressed