refactored client
refactored api to allow spefying fields