added tile shuffling code snippet