rates and packages logic