changes, fixed numerical problems.