Changed to do lookups first.