wrote a function to create a Client object