creates local scope for canvas, removes the passing of canvas throughout module