closes #49, closes #113