simplifying/cleaning the code for media & progress