refact vendor to template