the version before refactor client