added a getfitness function