fixed the creation process for card array