taslk 6: counting percentage, refactoring