added canvas and reworked init