complete rewriting:
	createTree()
	createMap()