implemented advanced vector operations, collision check for lines