refacto to follow spec
Merge pull request #3 from cotal/master

refacto to follow spec