attempted line intersection function, currently unfinished