fixed bug when passing score-population of 1 into the function