Changed size method to length on total_records