patches to issue #1
fixes #30
major update that fixed #30 #29 #28 #23 #20 #19