add menu, some modification to platform.js