moved media request check into its own function