sync example code with real ones