update for new interface of jgame.js