As an illustration of the complexities: a 2006 Massachusetts law requires payment of tax on "pre-written" (not custom) software purchased and downloaded over the Internet for installation and use in Massachusetts, regardless of where it originates.