refactored media tag