function for printing board