update to use platform.js