refactored samples