changes to make required param agnostic- only looks for media=

it only looks for media=