fixing bugs closes #65 closes #66