draw line function