now using std::generate instead of for-loop in create_individual()