fixed sample name issue. added tests