total_rows now accurate