adding z-index function and map