refactoring controller Core should work not tested