added focused state and unfocus callback