former transaction type becomes a regular attribute and refactored usage of ternary operators