Finished. Now need to consider test cases.