improved media tag setup