revise summarize code