Closes #147, closes #148
supporting tests