redo structure to make more consistant with other apps
begin inversions function and call mergesort on the 2 lists