rename  and update of registerToEvent