minor changes for dual writes