demo calculator now knows how to calculate rate