better loop
fixed formatting
MAJOR -- rates are kept as matrix!