updated the body of writeTransaction Method

by puneet aka munni