Add feature extraction code