refactored media chooser