updated platform.js