Improve example for flatMap