preparing db updates