refactor Loop Category