added ability to randomly generate the barriers