update to draw code