func to find IQR