addLayer method added