added server and client API