finish implementation of drawBoard function