split init codes from hub into serv