added totalRecords method