modified z calc and added new map