closed #3
fix issue #5
fixed issue #2
fixed issue #6
fixed issue #9