make changes suggested in #1 & #2, closes #1, closes #2