WIP: (tdd) a failing npm test
fix failing test
a refactor to both make tests pass and make code more sane.
all that's left is a xcxc to add more tests