moved repeating code to function in build script, added some media