improved performance and added layer zindex