bugs and minmax tree