minor modification of example1