Added total_results to the loop