updated README.
refactored.
indent style change.
updated example.