First working version of chat =) (without optimization (need more time and coffee))