added total records to output