refactor client to its own repo