refactored media viewe in home view