added the ability to pass a proc object for feature extraction