moved logic to separate file
line has instance color