implemented feature extraction, the enhanced version