add the function of scanning tags