add params in BaseController and use toObject method to convert a map to object