added isDirty to the viewmodel