big commit, should fix issue #3