improving of example code