Updated example code after recent change