use std::list remove_if member function (when reaching boundaries) to speed up application