duplicate chat code removed