use draw helper to draw line and rect