move last bit of drawing to draw function