more work on connecting layers