updated event class to use std::remove_if