Implementing the chatbot