setting up base controller