move random seed setting up to the top