separated server and client mode