More correct way to create own vectorizer