enforcing range constraints on parameters to try to cope with over and underflows