added source code for first test scenario