connect layers