Added rate function.