refactoring so that only one category is supported per transaction.