changed to querySelector and dynamic width and height for canvas