refactored vendor prototype logic