moved finish transaction to bottom of all methods that use it