closes #18, closes #17