updated version for event dispatcher and pimple