vectorize (with the patch of PR6194)