changes in method 2
added sample 2 and sample 3