closes #41 and 27