update detection example to latest version