the first loop is done 320858