some eigen code; added drawLevelsJson from Benjamin