Trying to create a chatting application