homeWork 9 add edit function