implemented chat but needs to be heavily tested