added relative layer generation