add client for resource and refine resource