pretty good first draft of the tx code