optimize the lookup