#10 making detecting mode