reset and commit