Added sample2 class with an add method