added function that finds intersection of two lines defined by two points