plotting code to compare two rates as well as conversion utility functions