closes #16, closes #15, closes #14