renaming minor variables to all lower
Extract function for finding decay in the ref_file