Trying to make this lookup more efficient