added initializePopulation function