First draft to Tor function