examples had errors; corrected

missing return statements