added curses timeout