protected void syncActivation(float[] activeNumbers) {
        //todo: refactor (it can become faster and easier)
        HashSet<Model> activeModel2 = new HashSet<>();
        activeModels.clear();
        if (activeNumbers[0] >= 0) {
            int speed = 0;
            int ls = 0;
            for (Model model : models) {
                if (model.getIsComplex()) {
                    ComplexModel c = (ComplexModel) model;
                    for (int i = 0; i < c.getSize(); i++) {
                        if (speed == (int) activeNumbers[ls]) {
                            ls++;
                            activeModel2.add(c.getModel(i));
                            if (ls >= activeNumbers.length) break;
                        }
                        speed++;
                    }
                } else {
                    if (speed == (int) activeNumbers[ls]) {
                        ls++;
                        activeModel2.add(model);
                        if (ls >= activeNumbers.length) break;
                    }
                    speed++;
                }

                if (ls >= activeNumbers.length) break;
            }
        }
        activeModels =activeModel2;
    }