More Progress on Problem 5: most of the functions are coded, just need to test them out.