remove cloneDeep and foldl1, foldr1, which somehow keep coming back