refactor media formats