added focus funcion