U: refactor client