start and stop drawing function