Associate registration to event

related to #3