refactored array to shuffle