added keyboard functionality