working version of blackjack api.