tag gen code structure layout