added sanity check for number of lookups on device