reorganise client library