updated for old deleted media query