layers implementation first draft