moved layer creation into a function so the renderers can override it when two layers are needed