removed extra srand call