control server main implementation