Removed redundant variables newVal1 and newVal2.