refactoring Abstract controller