replaced sample with std::vector<sample> so ensembles can be added