working on edit view and functions