adding 'type' attribute to Media class