refactor client dir