fix double-fill, rename variable
fix and add tests
update readme