use sklearn for most of the work