implement transaction repository and tests