* reformatted code
* added documntation in README