The sample code is wrong and misleading