correct some errors and deleted the code for dividing large array
do some clean!