original sequential implementation
completed assignment in parallel with report and tests.
initial sequential assignment