closes #16 and closes#34