Simplify detect