Used different implementation for Deck class.