Removed duplicate code and combined it into a single method.
got chatting working soon to come whispers