move client into class