took out garbage for scaling the result function