closes #19, closes #18