more improvements to that example