added keyboard control