Refactored shape sample