simplify example code