[TASK] refactoring for client