closes #21, closes #34