emplement edit function for essay