Exampe implementation of chat application