Fixes

resolves issues #15 , #16 and #18

also #17 and #20