prepared server implementation for answer tree construction and message handling