extract_features function implemented