refactored vendor lookup