Implement efficient  function for point queries.