added file parsing
added implementation
tweaks
Added unit test.