make medianOfMedians properly recursive! TODO: understand the runtime and austin rochford's implementation
clean up a bit