Improved rebuilding + example