added class in js chat generation