refator code of Vectorizers