updated how canvas object is created/used