converted functions into a Deck js prototype