added update, flatten methods
fixed README.md conflict