`i < 3` should replace with `i < results.size`.