whitespace
unit tests, improved defensive coding
unit tests