added className argument to _extract_source