updated for external use of transaction functions