added an eventloop