deck model : code refactoring