detection working