reformat / simplication of canvas example