improved canvas rendering