[bugfix] defining endHandlers as dictioinary