changed srand seed to 1