work on edit functionality