better API for using ncurses