added buttons
almost all function migrated to ncurses