update sample choosing and feature calculation