basic chat and opening database