working code with some exception handling remaining (updated Readme.md)