at last! a version that works in-game.