line scanning & adding segments to grid added