added patch method for controllers and routers