added sampling and feature extractor