updated client initialization & added init() function to Client