added tests for example 6