add function of drawing a line