changed script to match media