move client to its own library