Refactor further in transaction type