move transaction validation into the Transaction object