refactored z-index usage