ncurses init in separate function