upgraded to deal with company ids.