added tx.py
removed dup tx code in PM