moved event listeners out of clouds