canvas example - added some functionallity