completet the curses version implementation