CardStack class written