added seed of rand