diary edit function done