It should be said that OP's DS solution was basically totally standard except for a very minor unnecessary diversion into percentages.