Improved performance and extended example