changed the deck variable from a local variable to a instance variable.