torp related code