added flatMap example