refactored code to include color seperately from each instance of chat