move event registration after refactor