added feature extraction and rationale code