refactored Bonus.js