Ditched the minmax function