Added truncate_std_dev code to utils