did a first pass on revising code