Modify to pick either randomly or sequentially