added function to draw board