refactored sample object