move curses addicted code into utils module