created sub function for explodeLines