Adding txid function
Adding unit tests