added prototype of server state management