modified base controller and model