Added some functions to canvas