closes #15 and #9