making switch to createcanvas