wrap canvas in class