implemented shuffle