refactored deck creation into deck.js