switched numpy argmax to own argmax