This pull request solves issue #13 and gets the rate() to return rates