fix torec to work with new api
Merge pull request #222 from rafiw/frodo

fix torec to work with new api