add function to save new transaction