take out some unnecessary returns; make showBoard more general