remove dependancy on srand