added thread draft code
first working prototype
minor changes (chat client)