Improved example, refactoring & $percentage fallback