more memory efficient find