added compare function to the deck