fix outdated code examples noticed by Farrukh Obaid