first round of testing done. midway through cleanup and refactoring