Why does this function just return True?