added transaction into persist method