drawing function upgrades