add documentation and tutorial
modify readme and generate proper tutorial for the code.