final program is coming together. multiple files re-implemented