finished first pass at documenting code