Export the tags handling into a function