add focus functionality