eliminating duplication with a base controller class