handle committing
handle nil changes