closes #10, closes #6, closes #4