add server name to CC api, refactoring