added a plot line function