revert changes in db