Added option to create a client and added fucntion to client class