finish implementing chat