complete layer implementation