cleaned code for xinmin_collector