debug: make add_client() more generic