Added a global distance method and global fitness average