added scaling factor function