functionality to draw line added.