[FIX]: refactor code to implement category properly