Added shuffle logic