use join instead of for loop; do not use parameter in split;