created base controller