set detection working