closes #20, closes #21