finished first pass of code.