refactoring - added Sample class