finished group work

maxValue segfaulting at end cases apparently...?