minor code improvements. No key echo