added events for focus and blur