impl torch detection