made a major change in extract_message