score dropdown based on par
refactored js