closes #12 and #6