The majority of studies on sleep creativity have shown that sleep can facilitate insightful behavior and flexible reasoning, and there are several hypotheses about the creative function of dreams. On the other hand, a few recent studies have supported a theory of creative insomnia, in which creativity is significantly correlated with sleep disturbance. Anecdotal accounts of sleep and creativity Jack Nicklaus had a dream that allowed him to correct his golf swing. German chemist Friedrich August Kekulé stated that the idea for the ring structure of benzene came to him in a day-dream, in which he saw snakes biting their own tails. Jasper Johns was inspired to paint his first flag painting as a result of a dream. Aphex Twin wrote much of the music on his album Selected Ambient Works Volume II by going to sleep in the studio, and then recreating the sounds he heard in dreams as soon as he woke up. Robert Louis Stevenson came up with the plot of Strange Case of Dr Jekyll and Mr Hyde during a dream. Paul McCartney discovered the tune for the song "Yesterday" in a dream and was inspired to write "Yellow Submarine" during hypnagogia. Mary Shelley's Frankenstein was inspired by a dream at Lord Byron's villa. British poet Samuel Taylor Coleridge wrote "Kubla Khan" after finding inspiration from an opium induced dream. Otto Loewi, a German physiologist, won the Nobel Prize for medicine in 1936 for his work on the chemical transmission of nerve impulses. He discovered in a dream how to prove his theory. Giuseppe Tartini, a composer, gained inspiration for his Devil's Trill Sonata in a dream where the Devil appeared to him and played the melody on Tartini's violin. An alternative interpretation of The Sleep of Reason Produces Monsters considers Francisco Goya's commitment to the creative process and the Romantic spirit—the unleashing of imagination, emotions, and even nightmares as made possible by the unconscious. Sleep and creativity studies REM sleep as a state of increased cognitive flexibility In a study on cognitive flexibility across the sleep-wake cycle, researchers discovered that when woken from REM sleep, participants had a 32% advantage on an anagram task (when compared with the number of correct responses after NREM awakenings). This was consistent with the hypothesis that due to the lack of aminergic dominance in REM sleep, this particular sleep state is highly conducive to fluid reasoning and flexible thought.