refactored bonus challenge