working line plot + fixed name rewrite of plot function