Adjusting sample code to changes with -client