Updated the drawing functions