proved fold_lenght with length