added ctx.translate, modified canvas width and height