Modify tree pattern