reducing complexity of cards#callback