issues #15,16 - more tests and exceptions