added JID parsing; message parsing