Implemented extract_schema