before wrapping intersection computing in the function
wrapped computations into function that finds intersection of two lines defined by two points