allow user to register message handlers