moved draw board to a function