final draft for CR/gist

style guide applied, one method broken out and one test added