modified data shuffle using linspace instead of randi