Modified query to use an index. Resolves #70