add a value_to_rate function.
as advised by @octo move to a rate computing function