Bug #17 #18 add tests