refactor media parser to use a strategy patern