added server main method