added canvas functions