decouple roles/manager/layer by adding attachToXXX