bugfix for one digit
added tests
update readme