plug controller to resource