Reordered functions in file
Setting period updates scaled threshold value