changed return value of rateObject() to double
various bugfixes for rateObject() and iteration loops