closes #34, closes #35, closes #36, closes #37, closes #40, closes #41, closes #42