first draft, overly long. think i can refactor