Fixed variable name typo
Altered the return type of fitness so that SampleFromPDF accepts argument