Made some changes to mini max