first workable implementation

TODO: Travis CI test
TODO: README.md