Added extend functionality.