put all window.addstr logic in one place