register reply handler