port the last example to SDL
minor cleanup