improve the process of decide which media type & device