abstracted z-index functionality