Added new segments, completed the random segment choosing function