much simpler implementation

TODO: tests + readme
add to readme