added (hopefully) working draw code