Changed to use query in look up