closes #9 and #7