update the Api controller and add Manager class