working on conversion to curses