removed some deprecated calls in the example code