refactor cards array to be private