remove debug code
events management