tried to improve the interaction on focus and blur