- implementing chat functions, created logic for searching and creating chats