closes #39. closes #30