added base controller for api