Update tag script (clean code)