working client generator and replacement of array with string