better shuffle algorithm + thread safer