use a better scaling algorithm