initial attempt to minmax