move client initialization to separate file