return argmax instead of computing later