checked in a failing test for #76
i'm not sure what that code is doing so i rewrote it
extrated to separate class for testability
added unit tests for various versioning scenarios