bare bones feature extraction code