refactor the parsing and add doctest
Merge pull request #1 from livibetter/refactor-and-doctest

refactor the parsing and add doctest