add transaction for updating