updated chat and resize functionality