Who wrote the fairy tale which is libretto based on