update example code
use 'auto'