refactor expression media.js