is it a good idea to do it with for? not foreach? You have flipped `$domains` and left `$catalogues`