how to used the loop detector