converted ncurses functions to a class
fixed sigint handler exception