added curses output, keyboard control