added some methods in BaseController