refactored to use snake case
got most tests passing; using underscore.js library