handle more relay messages, use tree model