added "digit" as argument type
implemented "digit" type
changed exception message
added optional constraints for fit()
added missing docblock