made some minor changes in decision part of code, left a comment for dynamic rates; something fishy is going on there