final protected function getMaster(string $mastername)
    {
        if (FEnv::get("app.is_components") == 1) {
            $file = JL::open(FEnv::get("framework.baseapps.apps.file"));
        } else {
            $file = JL::open(FEnv::get("framework.config.core.apps.file"));
        }

        $app = null;

        foreach ($file as $one => $val) {
            if (isset($val->name) && FEnv::get("app.call") == $val->name) {
                $app = $val;
                break;
            }
        }

        if ($app != null) {
            $class = FEnv::get("app.call")."\Masters\\".$mastername."Master";
            if (class_exists($class)) {
                return (new $class);
            } else {
                throw new Server500(new \ArrayObject(array("explain" => "Master $mastername does not exist",
                    "solution" => "Please check masters declaration")));
            }
        } else {
            throw new Server500(new \ArrayObject(array("explain" =>
                ((FEnv::get("app.is_components") == 1)? "BaseApp" : "App" )." ".
                FEnv::get("app.call")." does not exist in apps.json",
                "solution" => "Please check app declaration")));
        }
    }