Using thread on getting chats