zihu: optimize the code for processing data
delete some code not used anymore