implement structure of webchat