make maxfeatures optional