start to code function "view transaction"