implement removefeatures for query