attempt at a little javascript eventstream