Implemented transactions function.