finished drawing code