added a parseSync function
refactored to reduce code duplication
update the readme
Merge pull request #4 from richorama/master

added a parseSync function