New version faster, but still one pass