added missing time2freq function