another attempt at stack get max