add docs, reimplement isDirty