closes #12, closes #51