implement smarter media selection