raise exception if rate is not correct