ch3 work
added length function using fold right