changed detect()