initialize before going into curses mode