complete OutCardAi logic