closes #16 and #17