refactor of function print board