update the structure & done response & error handling