separating client message handler from ui