added code to freq_to_RH function that uses the LUT