added function for finding maximum fitness