redo z-index (chaim branch)