fixed sample code mistake