define detect?method