moved the srand to the main.cpp