added checkDirty function to Model