Created worstFit function