new lines code with movement that crosses intersection line