Add an utility 'extend' method