added keyboard reading
tidyup