with addLayer functionality