working on edit function. Not finished