added canvas scaling, index.html, test function