printing via ncurses