closes #19 closes #42