rearranged step 1
added resetDraw function