adjusted this to fix issue #37