added tests, fixed sample, header and class implementation files