support for passing rates and fix a couple bugs