collision detection

Added collision detection of lines