working on when data model
got edits working properly