chat fully working using socket