updated transaction API
updated test cases