         let realm = try! Realm()
         let results = realm.objects(ShiftSystemDB).filter("groupid = %@",groupid)
         
-        for(var i = 0; i < results.count; i++){
+        for i in 0 ..< results.count{
             name.append(results[i].name)
         }
         

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

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