transaction refacored