added outputDungeon function