         if(DBmethod().DBRecordCount(StaffNameDB) == 0){
             return nil
         }else{
-            for(var i = 0; i < DBmethod().DBRecordCount(StaffNameDB); i++){
+            for i in 0 ..< DBmethod().DBRecordCount(StaffNameDB){
                 let name = realm.objects(StaffNameDB).filter("id = %@",i)[0].name
                 array.append(name)
             }

        var array: [String] = []
        let realm = try! Realm()
        
        for(var i = 0; i < DBmethod().DBRecordCount(ShiftSystemDB); i++){
            let name = realm.objects(ShiftSystemDB).filter("id = %@",i)[0].name
            array.append(name)
        }

            let realm = try Realm()
            let count = DBmethod().DBRecordCount(StaffNameDB)
            
            for i in id ..< count{
                //
                let nextrecord = realm.objects(StaffNameDB).filter("id = %@",i+1)[0]
                
