minimax functioning, just need to handle conversion properly