improved the function to show list of transactions