new concept working, but layer optimisation needs some work