keyboard handling added