refactored category view