comments added and test of example 1