reworked the scale factors so that rms error was reduced