cleaned up a bit, iterating over the model but still can't bind the add and edit functions