Updated the fitness calculation