generic reusable client