began adding drawing function