refactored samples 01-21