refactoring shows controller