added support for layer groups