add focus function