Added drawLine algorithm