refactoring media object