code first then canvas