upgraded to version 0.5.0 of event-when