add srand before rand