refactor some curses addicted code