added fold right
size using foldRight