detection mechanism