adding canvas functions