added  function to support spectrum pairing