fix issue #3
merge issue #1 and #3