extracted portion of vendor method to clean up code