removing unnecessary $result in has method