populate the edit form correctly with data