refactored show action