added server init code