add function adjustMaps and some adjustments