fix complex example code