fixing code for getting fitness