added transaction functionality