further performance optimizations
make minimizer a data member of the algo so that memory is only allocated once