New method for getting zIndex