Adding z-index function