my earnings
refactored