corrected typo in example: flaten --> flatten