Completed function to print out board