fix bug where the `to` position would be off by one
Added README and example implementation